package com.frank.jpaBatchSave.repository;

import com.frank.jpaBatchSave.entity.Student;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface Student1Repository extends PagingAndSortingRepository<Student, Integer> {

    @Modifying
    @Query(value = "update t_student set address =:address where id =:id", nativeQuery = true)
    int updateAddress(String address, int id);
}
